<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAgentXiamenBankAccountCardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('agent_xiamen_bank_account_cards', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('axba_id')->index()->comment('代理商银行账号 ID');
            $table->bigInteger('agent_id')->index()->comment('代理商 ID');

            $table->char('bank', 16)->default('')->comment('银行(国际银行文档编号)');
            $table->char('bank_card_no', 32)->default('')->comment('银行卡号');
            $table->char('phone', 16)->default('')->comment('预留手机号');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('agent_xiamen_bank_account_cards');
    }
}
